﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace QuangMobile
{
    public partial class WebContent : System.Web.UI.Page
    {
        private static string mod;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["mod"] != null)
            {
                mod = Request.QueryString["mod"].ToString();
            }
            LoadContent(mod);
        }

        private void LoadContent(string p)
        {
            string sql = "SELECT NoiDung FROM dbo.tblWebContent WHERE MaDM = @mod";
            List<SqlParameter> arrParams = new List<SqlParameter>();
            arrParams.Add(SqlHelper.CreateParameterObject("@mod", SqlDbType.NVarChar, ParameterDirection.Input, mod));
            ltrContent.Text = SqlHelper.ExecuteScalar(CommandType.Text, sql, arrParams).ToString();
        }
    }
}
